<?php

namespace app\common\model\book;

use think\Model;
use think\model\concern\SoftDelete;

class Book extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'datetime';

    public function user()
    {
        return $this->belongsTo('app\\common\\model\\user\\User');
    }

    public function section()
    {
        return $this->hasMany('BookSection');
    }
}
